package pushup.model;

public class Field extends AbstractTypeRelatedEntity {
	private String fieldName;
	private int startingOffset;
	private int length;
	
	public Field(Type fieldType, String fieldName, int startingOffset, int length){
		this.relatedType = fieldType;
		this.fieldName = fieldName;
		this.startingOffset = startingOffset;
		this.length = length;
	}
	
	public Type getFieldType(){
		return relatedType;
	}
	
	public String getFieldName(){
		return relatedType.getName() + ":" + fieldName;
	}
	
	public String toString(){
		return "[" + getFieldType().getShortName() + "] " + getFieldName();
	}



	public int getStartingOffset() {
		return startingOffset;
	}



	public int getLength() {
		return length;
	}

}
